import { Component, OnInit } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Router,ActivatedRoute} from '@angular/router'
@Component({
  selector: 'app-tag-edit',
  templateUrl: './tag-edit.component.html',
  styleUrls: ['./tag-edit.component.css']
})
export class TagEditComponent implements OnInit {
 id =this.route.snapshot.params.id;

public tag={
  title:'',
  id:this.id
}
  constructor(
    private http:HttpClient,
    private router:Router,
    private route:ActivatedRoute
  ) { }

  ngOnInit(): void { 
  }
tagEdit(){
this.http.post("http://localhost:3000/tags/"+this.id,this.tag)
}
}
